﻿/* ######################################## *\
 * ### Copyright (C) 2009 AJ Ravindiran ### *
 * ### HTTP://THEAJ.NET/ <AJ@THEAJ.NET> ### *
\* ######################################## */
using System;

namespace AJRavindiran.Jolt.Utilities
{
    /// <summary>
    /// Represents string utilities.
    /// </summary>
    public static class StringUtilities
    {
        #region Fields
        public static char[] mValidCharacters =
        {
            '_', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 
            'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 
            't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', 
            '3', '4', '5', '6', '7', '8', '9'
        };
        #endregion

        #region Properties
        /// <summary>
        /// Gets valid characters.
        /// </summary>
        public static char[] ValidCharacters
        {
            get { return mValidCharacters; }
        }
        #endregion

        #region Methods
        /// <summary>
        /// Java's equalsIgnoreCase method.
        /// </summary>
        public static bool EqualsIgnoreCase(this string value, string compare)
        {
            return (compare.ToLower() == value.ToLower());
        }
        #endregion
    }
}
